﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage.Master" AutoEventWireup="true"
    CodeBehind="NewsList.aspx.cs" Inherits="ZF.BLL.Admin.NewsList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="tabHeadMenu <%=this.pt==0?"":"dn_" %>">
    
    <a href="<%=this.ListPage %>" class='<%=(Type==0)?"action":"" %>'>所有记录</a> 
        <%
            int i = 0;
            foreach (var item in DictionaryConfig.INewType)
            {
                i++;%>
          
          <a href="<%=this.ListPage %>?t=<%=i%>" class='<%=(Type==i)?"action":"" %>'><%=item.Key%></a> 
        <%} %>
    
 
    </div>
 
    <!--列表 开始-->
    <div class="tabContainer">
        <zf:GridView ID="gvList" runat="server" OnSorting="gvListSorting" OnPageIndexChanging="gvListPageChanging">
            <Columns>
                <zf:TemplateField IsKeyField="true" DefaultSortField="true" DefaultSortDirection="Descending"
                    SortExpression="News.NewsId">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="KeyLabel" Text='<%# Eval("News.NewsId")%>'></asp:Label>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField IsCheckField="true">
                </zf:TemplateField>
                <zf:TemplateField IsSerialNoField="true">
                </zf:TemplateField>
                <zf:TemplateField HeaderText="类型">
                    <ItemTemplate>
                        <%#  Eval("News.Type")%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="标题" ItemStyle-Width="300">
                    <ItemTemplate>
                        <%#  ((string)Eval("News.Title")).MaxLength(50)%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="状态" ItemStyle-Width="80" >
                    <ItemTemplate>
                       <%-- <%#  ((bool)Eval("News.Focus")) ? "焦点" : ""%>--%>
                        <%#  ((bool)Eval("News.Overhead")) ? "顶置" : ""%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="来源">
                    <ItemTemplate>
                        <%#  Eval("News.ComeFrom")%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="作者">
                    <ItemTemplate>
                        <%#  Eval("News.Author")%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="发布时间" DefaultSortDirection="Descending" SortExpression="News.AddTime">
                    <ItemTemplate>
                        <%# ((DateTime)Eval("News.AddTime")).ToShortDateString()%>
                    </ItemTemplate>
                </zf:TemplateField>
                <zf:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <span class="<%=this.pt==0?"":"dn_" %>"><a href='/news/index.aspx?id=<%# Eval("News.NewsId")%>'
                            target="_blank">浏览</a> | <a href='NewsManage.aspx?ot=Edit&nid=<%# Eval("News.NewsId")%>'>
                                修改</a> | </span><span class="<%=this.pt==0?"dn_":"" %>">
                                
                                
                                <zf:LinkButton ID="LinkButton112" runat="server" OnClick="CY" CommandArgument='<%# Eval("News.NewsId") %>' >采用</zf:LinkButton>
                                
                               
                                    
                                    
                                    
                                    
                                     | <a href='NewsManage.aspx?ot=Edit&nid=<%# Eval("News.NewsId")%>'>
                                        查看</a> | </span>
                        <zf:LinkButton ID="LinkButton1" runat="server" OnClick="Delete" CommandArgument='<%# Eval("News.NewsId") %>'
                            OnClientClick="return confirm('是否确定要删除此记录');">删除</zf:LinkButton>
                    </ItemTemplate>
                </zf:TemplateField>
            </Columns>
        </zf:GridView>
    </div>
    <!--列表 结束-->
    <div class="mt5_ fc_">
    </div>
    <!--自定义按钮 开始-->
    <div class="btnContainer mt10_">
        <span class="fl_ mr10_">
            <input type="checkbox" class="checkAll" bind=".tab" />选中本页显示的所有记录</span>
        <zf:LinkButton ID="LinkButton1" runat="server" OnClick="Delete" CommandArgument='select'
            OnClientClick="return confirm('是否确定要删除选中记录');">删除选中的记录</zf:LinkButton>
        <a href="NewsManage.aspx?ot=AddNew">添加记录</a>
    </div>
    <!--自定义按钮 结束-->
    <div class="fc_ mt10_">
    </div>
    <!--搜索 开始-->
    <%--<div class="searchContainer">
        <table>
            <tr>
                <td class="l">
                    搜索选项:
                </td>
                <td class="m">
                    <div class="c">
                        <span class="t">物业名称:</span><span class="c">
                            <zf:TextBox runat="server" class="stxt" ID="tbTitle"></zf:TextBox></span>
                        <span class="t">物业类型:</span><span class="c">
                            <zf:DropDownList runat="server" ID="ddlHouseType" class="stxt" AppendDataBoundItems="true">
                                <asp:ListItem Value="-1" Text="未选择"></asp:ListItem>
                            </zf:DropDownList>
                        </span><span class="t">&nbsp;&nbsp;发布时间(小于):</span><span class="c">
                            <zf:TextBox runat="server" class="dttxt" ID="tbEndTime1" onfocus="calendar();"></zf:TextBox></span>
                        <br />
                        <span class="t">客户编号:</span><span class="c">
                            <zf:TextBox runat="server" class="stxt" ID="tbHouseNo"></zf:TextBox></span>
                        <span class="t">房源状态:</span><span class="c">
                            <zf:DropDownList runat="server" ID="ddlHouseStatus" class="stxt" AppendDataBoundItems="true">
                                <asp:ListItem Value="-1" Text="未选择"></asp:ListItem>
                                 <asp:ListItem Value="1" Text="发布中"></asp:ListItem>
                                  <asp:ListItem Value="2" Text="停止发布"></asp:ListItem>
                                   <asp:ListItem Value="3" Text="已交易"></asp:ListItem>
                            </zf:DropDownList>
                        </span><span class="t">&nbsp;&nbsp;发布时间(大于):</span><span class="c">
                            <zf:TextBox runat="server" class="dttxt" ID="tbEndTime2" onfocus="calendar();"></zf:TextBox></span>
                        <zf:Button runat="server" ID="Button2" Text="搜 索" OnClick="Search" class="linkbtn" />
                        <zf:Button runat="server" ID="Button1" Text="全 部" OnClick="AllList" class="linkbtn" />
                    </div>
                </td>
            </tr>
        </table>
    </div>--%>
    <!--搜索 结束-->
</asp:Content>
